<template>
  <div class="layout">
    <scroll-view
      scroll-x="true"
      scroll-with-animation="true"
    >
      <div class="menu-list">
        <div
          class="menu-item"
          @click="modelNavigateTo(item)"
          v-for="(item, index) in res.list"
          :key="index"
        >
          <div>
            <u-image
              width="96rpx"
              height="96rpx"
              class="menu-img"
              :src="item.img"
            >
              <u-loading slot="loading"></u-loading>
            </u-image>
          </div>
          <div class="menu-title">{{ item.title }}</div>
        </div>
      </div>
    </scroll-view>
  </div>
</template>
<script>
import { modelNavigateTo } from "./tpl";
export default {
  title: "五列菜单",
  props: ["res"],
  data() {
    return {
      modelNavigateTo,
    };
  },
};
</script>
<style lang="scss" scoped>
@import "./tpl.scss";
.menu-list {
  display: flex;
  align-items: center;
  // flex-wrap: wrap;

  > .menu-item {
    text-align: center;
    width: 96rpx;
    // flex: 1;
    margin: 0 42rpx 0 0;
  }
}
.menu-img {
  display: flex;
  margin: 0 auto;
  width: 96rpx;
  height: 96rpx;
  border-radius: 36rpx;
}
.menu-title {
  font-size: 24rpx;
  color: #212121;
}
</style>